package com.itbaizhan;

import java.util.Arrays;

/**
 * object[][]数组存储表格数据
 */
public class Test07 {

    public static void main(String[] args) {
        Object[] a1 = {1001,"莫小海",18,"讲师","2-14"};
        Object[] a2 = {1002,"莫小明",20,"助教","10-10"};
        Object[] a3 = {1003,"莫小华",22,"主任","6-6"};
        Object[][] emps = new Object[3][];
        emps[0] = a1;
        emps[1] = a2;
        emps[2] = a3;
        System.out.println(Arrays.toString(emps[0]));
        System.out.println(Arrays.toString(emps[1]));
        System.out.println(Arrays.toString(emps[2]));

        System.out.println("==============");
        for(int i=0;i<emps.length;i++){
          //  System.out.println(emps[i]);
            System.out.println(Arrays.toString(emps[i]));
        }
        //遍历
        System.out.println("===========");
        for(int i=0;i<emps.length;i++){
            for(int j=0;j<emps[i].length;j++){
                System.out.print(emps[i][j]+"\t");
            }
            System.out.println();
        }

    }
}
